﻿using System;
using System.Linq;
using System.Xml.Linq;
using System.Net.Http;
using OurDailyBread.Helpers;
using Windows.Data.Json;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Text;
using System.Net.Http.Headers;
using Newtonsoft.Json.Converters;
using OurDailyBread.Model;

namespace OurDailyBread.Design
{
    public class DesignCommentDataService : ICommentDataService
    {

        public void GetData(DateTime commentTime, Action<Object, Exception> callback)
        {

                List<CommentData> commentList = new List<CommentData>();
                for (int i=0; i < 20; i++)
                {
                    CommentData comment = new CommentData();
                    comment.BreadUrl = "2012-12-24";
                    comment.Comment = "comment " + i.ToString();
                    commentList.Add(comment);
                }

                string getResults = JsonConvert.SerializeObject(commentList);
                callback(getResults, null);
        }

        public void PutData(DateTime commentTime, string commentText, Action<Object, Exception> callback)
        {
        }
    }
}